package com.light.util;

import javax.swing.*;
import java.net.URL;

/**
 * @Author MoonlightL
 * @ClassName: SwingUtil
 * @ProjectName flappy_bird
 * @Description: 工具类
 * @DateTime 2023/3/13, 0013 11:01
 */
public class SwingUtil {

    /**
     * 获取图片
     * @param path
     * @return
     */
    public static ImageIcon getImageIcon(String path) {
        URL url = SwingUtil.class.getClassLoader().getResource(path);
        return new ImageIcon(url);
    }
}
